fix(context): restore skills after compaction - #9043
NicholasRBowers merged 1 commit into
Conversation
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
1 similar comment
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
35c7c9b to
df70886
Compare
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The identical skills-loss bug stays live on messaging: WatchThe PR's stated harm — "the next user turn can therefore no longer discover the skills available to the session" — applies equally to messaging: the driver handles [DESIGN-REVIEWED] a76f976 |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS Dashboard-only arm: the same unarmed-reinjection gap stays at 17 counted compaction sites across 11 messaging surfaces and the task runner. Not justified as shipped
What this change shipsInventory (4 items) — 3 justifiedIntent: FIX — after any compaction completes, the next dashboard turn should still be able to discover the session's skills. Provenance: the new provider-native-status test fails on base.
[FIRST-PRINCIPLES-REVIEWED] a76f976 |
df70886 to
a3c3fbb
Compare
|
Rebased onto main Conflicts: none — clean rebase, diff unchanged at +38/-0 in 2 files. Gates run locally (changed files only): Please review the rebased head. Note that a maintainer push makes the maintainer the last pusher, so under this repo's last-push rule a second approver is needed before merge. Reply here if anything looks wrong. |
a3c3fbb to
0c0ca70
Compare
Provider-native compaction drops session-start context. Re-arm the existing one-shot skills reinjection after confirmed success so the next turn retains the available skills.
0c0ca70 to
a76f976
Compare
NicholasRBowers
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (3 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, SAST annotations clean, security checklist all-NO, AI reviewers green. Category: fix with a clear root cause — confirmed compaction completion never armed the existing one-shot skills-context reinjection flag, so the next dashboard turn ran without its session-start skills context; the change arms that flag at the three confirmed-completion points and leaves failed deferred compaction unarmed. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/memory-skills-hooks.md. CodeQL is not applicable on this fork PR (default-setup emits no check-run); SAST coverage is Semgrep only, latest run success with 0 annotations.
Provider-native compaction drops session-start context. Re-arm the existing one-shot skills reinjection after confirmed success so the next turn retains the available skills. Co-authored-by: Premshay <28099628+Premshay@users.noreply.github.com>
Problem / Motivation
Provider-native and manual ACP compaction replace the model context but do not arm the existing one-shot skills-context reinjection. The next user turn can therefore no longer discover the skills available to the session.
Why it matters
Compaction is meant to preserve an ongoing session. Losing the skills index after it completes makes tool and workflow discovery depend on a restart rather than the normal next turn.
What changed
Arm the existing
mark_needs_reinjectionflag when a native compaction completes, including immediate Claude completion, deferred Kiro completion, and provider-emitted completion status. The next turn consumes the flag through the established prompt-building path.Pattern harvest
Rule candidate: review-prompt
Pattern: Provider context replacement must rearm session-start context.
When a provider mutates or replaces its context outside the normal session lifecycle, rearm durable session-start context at the completion event. Reuse the existing one-shot reinjection seam rather than duplicating prompt assembly in each provider path.
Tests
PYTHONPATH=src /home/prems/dev/repos/premshay/KiroCrew/.venv/bin/pytest -q test/test_dashboard_chat.py -n0— 767 passed.What changed (motivation → approach → change)
N/A — covered by the existing
## What changedsection.Manual verification
N/A — focused automated coverage is sufficient.
Related Issues
N/A.
Checklist
Contribution License Agreement
N/A — template placeholder; no CLA wording is supplied.